package com.ruoyi.activitySignLog.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activitySignLog.mapper.ActivitySignLogMapper;
import com.ruoyi.activitySignLog.domain.ActivitySignLog;
import com.ruoyi.activitySignLog.service.IActivitySignLogService;

/**
 * 活动报名Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-14
 */
@Service
public class ActivitySignLogServiceImpl implements IActivitySignLogService 
{
    @Autowired
    private ActivitySignLogMapper activitySignLogMapper;

    /**
     * 查询活动报名
     * 
     * @param id 活动报名主键
     * @return 活动报名
     */
    @Override
    public ActivitySignLog selectActivitySignLogById(Long id)
    {
        return activitySignLogMapper.selectActivitySignLogById(id);
    }

    /**
     * 查询活动报名列表
     * 
     * @param activitySignLog 活动报名
     * @return 活动报名
     */
    @Override
    public List<ActivitySignLog> selectActivitySignLogList(ActivitySignLog activitySignLog)
    {
        return activitySignLogMapper.selectActivitySignLogList(activitySignLog);
    }

    /**
     * 新增活动报名
     * 
     * @param activitySignLog 活动报名
     * @return 结果
     */
    @Override
    public int insertActivitySignLog(ActivitySignLog activitySignLog)
    {
        activitySignLog.setCreateTime(DateUtils.getNowDate());
        return activitySignLogMapper.insertActivitySignLog(activitySignLog);
    }

    /**
     * 修改活动报名
     * 
     * @param activitySignLog 活动报名
     * @return 结果
     */
    @Override
    public int updateActivitySignLog(ActivitySignLog activitySignLog)
    {
        activitySignLog.setUpdateTime(DateUtils.getNowDate());
        return activitySignLogMapper.updateActivitySignLog(activitySignLog);
    }

    /**
     * 批量删除活动报名
     * 
     * @param ids 需要删除的活动报名主键
     * @return 结果
     */
    @Override
    public int deleteActivitySignLogByIds(Long[] ids)
    {
        return activitySignLogMapper.deleteActivitySignLogByIds(ids);
    }

    /**
     * 删除活动报名信息
     * 
     * @param id 活动报名主键
     * @return 结果
     */
    @Override
    public int deleteActivitySignLogById(Long id)
    {
        return activitySignLogMapper.deleteActivitySignLogById(id);
    }
}
